package com.rover022.flixelgame.element.weapon.bullet
{
	import com.rover022.flixelgame.element.BaseElement;
	import com.rover022.flixelgame.element.weapon.BaseFlxWeapon;
	import org.flixel.plugin.photonstorm.FlxWeapon;
	import org.flixel.plugin.photonstorm.BaseTypes.Bullet;

	public class BaseBullet extends Bullet
	{
		public function BaseBullet(_weapon:FlxWeapon, id:uint)
		{
			super(_weapon, id);
		}

		/**
		 * 子弹得到武器
		 * @return
		 *
		 */
		public function get parentWeapon():BaseFlxWeapon
		{
			return weapon as BaseFlxWeapon;
		}

		/**
		 * 子弹得到使用者
		 * @return
		 *
		 */
		public function get parentElement():BaseElement
		{
			return parentWeapon.parent;
		}

		/**
		 * 子弹得到使用者阵营
		 * @return
		 *
		 */
		public function get factionType():uint
		{
			return parentElement.factionType;
		}
	}
}
